package behavior.visitor;

import behavior.visitor.element.InteriorElement;
import behavior.visitor.element.WarElement;
import behavior.visitor.visit.Viewer;
import behavior.visitor.wujiang.ShuGuoWujiang;
import behavior.visitor.wujiang.Wujiang;

public class Demo {

    public static void main(String[] args) {
        // 创建武将 -简易
        Wujiang zhaoyun = new ShuGuoWujiang();
        zhaoyun.setName("赵云");
        zhaoyun.GenerateCamp("蜀国");
        Viewer viewer = zhaoyun.chooseVisit();
        // 创建武将行动
        WujiangAction wujiangAction = new WujiangAction();
        wujiangAction.addWujiangAction(new WarElement(zhaoyun));
        wujiangAction.addWujiangAction(new InteriorElement(zhaoyun));
        wujiangAction.action(viewer);
    }
}
